import 'dart:convert';

import 'package:enterprise_v6_app/app/data/common/choice_bean.dart';
import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/inspec_query_plan_entity.g.dart';

export 'package:enterprise_v6_app/generated/json/inspec_query_plan_entity.g.dart';

@JsonSerializable()
class InspecQueryPlanEntity extends ChoiceBean {

	InspecQueryPlanEntity();

	factory InspecQueryPlanEntity.fromJson(Map<String, dynamic> json) => $InspecQueryPlanEntityFromJson(json);
	String? createBy;
	String? createById;
	String? createDate;
	int? currentExecution;
	String? deleted;
	String? id;
	List<String>? ids;
	String? programmeName;
	int? remember;
	String? timeTaskIds;
	String? updateBy;
	String? updateById;
	String? updateDate;
	String? userId;
	String? validityPeriodEndTime;
	String? validityPeriodStartTime;
	bool isCheck = false;
	Map<String, dynamic> toJson() => $InspecQueryPlanEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}

  @override
  String getId() {
    return id ?? '';
  }

  @override
  bool getIsChecked() {
    return isCheck;
  }

  @override
  String getShowName() {
		if(programmeName != null && programmeName != '') {
		  return programmeName!;
		} else {
			return '空';
		}
  }

  @override
  setIsChecked(bool isChecked) {
		isCheck = isChecked;
  }
}
